package com.geping.etl.common.service.kettle.impl;

import com.geping.etl.common.dto.KettleRunResultDto;
import com.geping.etl.common.service.Sys_Cmdtask_ParamService;
import com.geping.etl.common.service.kettle.RunPathFacadeService;
import com.geping.etl.common.service.kettle.RunPathServiceDispatcher;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RunPathFacadeServiceImpl implements RunPathFacadeService {

    @Autowired
    private Sys_Cmdtask_ParamService sysCmdtaskParamService;

    @Override
    public KettleRunResultDto runPath(String pathname, String dataDate) {
        sysCmdtaskParamService.refreshDataDate(dataDate);
        return RunPathServiceDispatcher.doRun(pathname);
    }
}